<% calculator.admin_form_preference_names.map do |name| %>
  <%= render "solidus_promotions/admin/shared/preference_fields/#{calculator.preference_type(name)}",
    name: "#{prefix}[calculator_attributes][preferred_#{name}]",
    value: calculator.get_preference(name),
    label: calculator.class.human_attribute_name("preferred_#{name}", default: I18n.t(name, scope: :spree, default: name.to_s.humanize)) %>
<% end %>
